package com.cskaoyan.bean.cart.bo;

import com.cskaoyan.util.StringUtils;
import lombok.Data;

import javax.validation.constraints.NotNull;

@Data
public class CartCheckoutBo {

   private Integer cartId;

   private Integer addressId;

   private Integer couponId;//前端传入参数 ?cartId=0&addressId=5&couponId=null&grouponRulesId=null 导致不能使用Integer接受，如下雷同,所以修改了set方法

   private Integer grouponRulesId;

   public void setCouponId(String couponId) {
      this.couponId = StringUtils.parseInt(couponId);
   }

   public void setGrouponRulesId(String grouponRulesId) {
      this.grouponRulesId = StringUtils.parseInt(grouponRulesId);
   }

   public void setCartId(String cartId) {
      this.cartId = StringUtils.parseInt(cartId);
   }

   public void setAddressId(String addressId) {
      this.addressId = StringUtils.parseInt(addressId);
   }
}
